﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="tm_MessageSearch.ascx.cs" Inherits="controls_tm_MessageSearch" %>
<table style="width: 100%" class="table">
    <tr>
        <td colspan="5" style="text-align: left">
            <asp:Label ID="lblResultSearch" runat="server" CssClass="titletext3"></asp:Label>
            <asp:GridView ID="gvMessageSearch" runat="server" AutoGenerateColumns="False" CssClass="table"
                Width="100%">
                <Columns>
                    <asp:TemplateField HeaderText="Chủ đề">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# GetLinkMessagesContent(DataBinder.Eval(Container, "DataItem.MessageId").ToString()) %>'
                                Text='<%# DataBinder.Eval(Container, "DataItem.msgSubject") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="fullName" HeaderText="Người gởi">
                        <ItemStyle Width="25%" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Ng&#224;y">
                        <ItemStyle HorizontalAlign="Center" Width="15%" />
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)DataBinder.Eval(Container, "DataItem.onDate")).ToShortDateString() %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Loại">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblMsgType" runat="server" Text='<%# MesssageType(DataBinder.Eval(Container, "DataItem.InfoType").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td style="width: 110px">
            <asp:Label ID="Label1" runat="server" CssClass="titletext3" Text="Thời gian :"></asp:Label></td>
        <td colspan="4">
            <asp:TextBox ID="txtFrDate" runat="server" Width="100px"></asp:TextBox>
            <asp:HyperLink ID="hplFrDate" runat="server" ImageUrl="~/images/calendarAJ.png"
                NavigateUrl="#"></asp:HyperLink>
            <asp:TextBox ID="txtToDate" runat="server" Width="100px"></asp:TextBox>
            <asp:HyperLink ID="hplToDate" runat="server" ImageUrl="~/images/calendarAJ.png"
                NavigateUrl="#"></asp:HyperLink></td>
    </tr>
    <tr>
        <td style="width: 110px;">
            <asp:Label ID="Label2" runat="server" CssClass="titletext3" Text="Loại thông điệp :"></asp:Label></td>
        <td colspan="4" >
            <asp:DropDownList ID="ddlMesssageType" runat="server" Width="110px">
                <asp:ListItem Selected="True" Value="All">Tất cả</asp:ListItem>
                <asp:ListItem Value="I_">Nhận</asp:ListItem>
                <asp:ListItem Value="O_">Gửi</asp:ListItem>
            </asp:DropDownList></td>
    </tr>
    <tr>
        <td style="width: 110px">
            <asp:Label ID="Label5" runat="server" CssClass="titletext3" Text="Chủ đề :"></asp:Label></td>
        <td colspan="4">
            <asp:TextBox ID="txtMsgSubject" runat="server" Width="450px"></asp:TextBox></td>
    </tr>
    <tr>
        <td style="vertical-align: top; width: 110px; text-align: left">
            <asp:Label ID="Label6" runat="server" CssClass="titletext3" Text="Nội dung :"></asp:Label></td>
        <td colspan="4">
            <asp:TextBox ID="txtMsgBody" runat="server" Width="450px"></asp:TextBox></td>
    </tr>
    <tr>
        <td style="width: 110px">
        </td>
        <td colspan="4">
            <asp:Label ID="lblMessage" runat="server" Visible="False"></asp:Label></td>
    </tr>
    <tr>
        <td style="width: 110px">
        </td>
        <td colspan="4">
            <asp:Button ID="btnOk" runat="server" CssClass="btn" OnClick="btnOk_Click" Text="Tìm"
                Width="85px" /><asp:Button ID="btnReset" runat="server" CssClass="btn" OnClick="btnReset_Click"
                Text="Làm lại" Width="85px" /></td>
    </tr>
</table>
